package com.sophossystems.client.asmon.dto;


import java.io.Serializable;


public class ActivityDTO implements Serializable
{
	/**
	 * 
	 */
	private static final long serialVersionUID = -3643874237217576079L;

	/** 
	 * This attribute maps to the column idActivity in the Activity table.
	 */
	protected int idActivity;

	/** 
	 * This attribute maps to the column Description in the Activity table.
	 */
	protected String description;

	/** 
	 * This attribute maps to the column idModule in the Activity table.
	 */
	protected int idModule;

	/** 
	 * This attribute represents whether the primitive attribute idModule is null.
	 */
	protected boolean idModuleNull = true;

	/**
	 * Method 'Activity'
	 * 
	 */
	public ActivityDTO()
	{
	}

	/**
	 * Method 'getIdActivity'
	 * 
	 * @return int
	 */
	public int getIdActivity()
	{
		return idActivity;
	}

	/**
	 * Method 'setIdActivity'
	 * 
	 * @param idActivity
	 */
	public void setIdActivity(int idActivity)
	{
		this.idActivity = idActivity;
	}

	/**
	 * Method 'getDescription'
	 * 
	 * @return String
	 */
	public String getDescription()
	{
		return description;
	}

	/**
	 * Method 'setDescription'
	 * 
	 * @param description
	 */
	public void setDescription(String description)
	{
		this.description = description;
	}

	/**
	 * Method 'getIdModule'
	 * 
	 * @return int
	 */
	public int getIdModule()
	{
		return idModule;
	}

	/**
	 * Method 'setIdModule'
	 * 
	 * @param idModule
	 */
	public void setIdModule(int idModule)
	{
		this.idModule = idModule;
		this.idModuleNull = false;
	}

	/**
	 * Method 'setIdModuleNull'
	 * 
	 * @param value
	 */
	public void setIdModuleNull(boolean value)
	{
		this.idModuleNull = value;
	}

	/**
	 * Method 'isIdModuleNull'
	 * 
	 * @return boolean
	 */
	public boolean isIdModuleNull()
	{
		return idModuleNull;
	}

	/**
	 * Method 'equals'
	 * 
	 * @param _other
	 * @return boolean
	 */
	@Override
	public boolean equals(Object _other)
	{
		if (_other == null) {
			return false;
		}
		
		if (_other == this) {
			return true;
		}
		
		if (!(_other instanceof ActivityDTO)) {
			return false;
		}
		
		final ActivityDTO _cast = (ActivityDTO) _other;
		if (idActivity != _cast.idActivity) {
			return false;
		}
		
		if (description == null ? _cast.description != description : !description.equals( _cast.description )) {
			return false;
		}
		
		if (idModule != _cast.idModule) {
			return false;
		}
		
		if (idModuleNull != _cast.idModuleNull) {
			return false;
		}
		
		return true;
	}

	/**
	 * Method 'hashCode'
	 * 
	 * @return int
	 */
	@Override
	public int hashCode()
	{
		int _hashCode = 0;
		_hashCode = 29 * _hashCode + idActivity;
		if (description != null) {
			_hashCode = 29 * _hashCode + description.hashCode();
		}
		
		_hashCode = 29 * _hashCode + idModule;
		_hashCode = 29 * _hashCode + (idModuleNull ? 1 : 0);
		return _hashCode;
	}

	/**
	 * Method 'createPk'
	 * 
	 * @return ActivityPk
	 */
	public ActivityPkDTO createPk()
	{
		return new ActivityPkDTO(idActivity);
	}

	/**
	 * Method 'toString'
	 * 
	 * @return String
	 */
	@Override
	public String toString()
	{
		StringBuffer ret = new StringBuffer();
		ret.append( "com.sophossystems.client.asmon.dto.Activity: " );
		ret.append( "idActivity=" + idActivity );
		ret.append( ", description=" + description );
		ret.append( ", idModule=" + idModule );
		return ret.toString();
	}

}
